/**
 *====================================================
 * 文件名称: FinanceBulkstockPledgeActionApi.java
 * 修订记录：
 * No    日期				作者(操作:具体内容)
 * 1.    2015年10月23日			chenxy(创建:创建文件)
 *====================================================
 * 类描述：(说明未实现或其它不应生成javadoc的内容)
 */
package com.yuexunit.finance.project.action.v1;

import java.math.BigDecimal;
import java.util.List;

import com.yuexunit.finance.context.FinVersion1;
import com.yuexunit.finance.project.action.v1.model.AppointPickupParams;
import com.yuexunit.finance.project.action.v1.model.PickupAuditInfo;
import com.yuexunit.finance.project.action.v1.model.input.NormalPickupParams;
import com.yuexunit.finance.project.action.v1.model.output.ExchangeContainerInventory;
import com.yuexunit.finance.project.action.v1.model.output.ExchangeInventoryInfo;
import com.yuexunit.finance.project.action.v1.model.output.PickupApplicationDetail;
import com.yuexunit.finance.project.action.v1.model.output.PickupApplicationLineInfo;
import com.yuexunit.finance.project.action.v1.model.output.PickupDelayApplicationDetail;
import com.yuexunit.finance.project.action.v1.model.output.PickupDelayApplicationLineInfo;
import com.yuexunit.page.PageCriteria;
import com.yuexunit.page.PageList;
import com.yuexunit.web.annotation.Action;
import com.yuexunit.web.annotation.Parameter;
import com.yuexunit.web.annotation.Permission;

/** 
 * @ClassName: FinanceBulkstockPledgeActionApi 
 * @Description: 货物质押管理 
 * @author chenxy 
 * @date 2015年10月23日 上午6:47:58  
 */
public interface FinanceBulkstockPledgeActionApi {

	@Permission
	@Action(version = FinVersion1.class, description = "提货申请")
	@Parameter(name = "pickupId", description = "提货申请ID")
	public String createNormalPickupApplication(NormalPickupParams pickupApplication);
	
	@Permission
	@Action(version = FinVersion1.class, description = "换箱Excel导入")
	public List<ExchangeInventoryInfo> importExchangeInventory(
			@Parameter(name = "fileUuid", description = "商品价格汇总Excel") String fileUuid
	);

	@Permission
	@Action(version = FinVersion1.class, description = "取消提货申请")
	public void cancelNormalPickupApplication(
			@Parameter(name = "pickupId", description = "提货申请ID") Long pickupId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "同意提货申请")
	public void consentNormalPickupApplication(
			@Parameter(name = "pickupId", description = "提货申请ID") Long pickupId,
			@Parameter(name = "financeValuation", description = "货物金额")  BigDecimal financeValuation,
			@Parameter(name = "bulkstockInterest", description = "货物利息") BigDecimal bulkstockInterest,
			@Parameter(name = "adjustAmount", description = "调整金额") BigDecimal adjustAmount,
			@Parameter(name = "allowValuation", description = "允许金额", nullable = true) BigDecimal allowValuation,
			@Parameter(name = "adjustReson", description = "审核调整原因", nullable = true) Integer adjustReson,
			@Parameter(name = "adjustment", description = "审核调整说明", nullable = true) String adjustment,
			@Parameter(name = "auditRemark", description = "审核备注", nullable = true) String auditRemark,
			@Parameter(name = "exchangeId", description = "换货/换箱-换货信息ID", nullable = true) Long[] exchangeId,
			@Parameter(name = "evaluatePrice", description = "换货/换箱-评估单价", nullable = true) BigDecimal[] evaluatePrice,
			@Parameter(name = "lowestPrice", description = "换货/换箱-最低价格", nullable = true) BigDecimal[] lowestPrice,
			@Parameter(name = "highestPrice", description = "换货/换箱-最高价格", nullable = true) BigDecimal[] highestPrice
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "提货申请审核-增补审核意见-商务部")
	public void supplementPickupCeoAuditOpinion(PickupAuditInfo params);
	
	@Permission
	@Action(version = FinVersion1.class, description = "提货申请审核-提交审核意见-商务部")
	public void submitPickupCeoAuditOpinion(PickupAuditInfo params);
	
	@Permission
	@Action(version = FinVersion1.class, description = "提货申请审核-增补审核意见-运营")
	public void supplementPickupBussinessAuditOpinion(PickupAuditInfo params);
	
	@Permission
	@Action(version = FinVersion1.class, description = "提货申请审核-提交审核意见-运营")
	public void submitPickupBussinessAuditOpinion(PickupAuditInfo params);
	
	@Permission
	@Action(version = FinVersion1.class, description = "提货申请审核-增补审核意见-资金")
	public void supplementPickupRiskAuditOpinion(PickupAuditInfo params);
	
	@Permission
	@Action(version = FinVersion1.class, description = "提货申请审核-提交审核意见-资金")
	public void submitPickupRiskAuditOpinion(PickupAuditInfo params);
	
	@Permission
	@Action(version = FinVersion1.class, description = "提货申请审核-增补审核意见-资金领导")
	public void supplementPickupRiskMemberAuditOpinion(PickupAuditInfo params);
	
	@Permission
	@Action(version = FinVersion1.class, description = "提货申请审核-提交审核意见-资金领导")
	public void submitPickupRiskMemberAuditOpinion(PickupAuditInfo params);
	
	@Permission
	@Action(version = FinVersion1.class, description = "提货申请审核-增补审核意见-风控")
	public void supplementPickupFinancialAuditOpinion(PickupAuditInfo params);
	
	@Permission
	@Action(version = FinVersion1.class, description = "提货申请审核-提交审核意见-风控")
	public void submitPickupFinancialAuditOpinion(PickupAuditInfo params);
	
	@Permission
	@Action(version = FinVersion1.class, description = "提货申请审核-增补审核意见-风控领导")
	public void supplementPickupOperationAuditOpinion(PickupAuditInfo params);
	
	@Permission
	@Action(version = FinVersion1.class, description = "提货申请审核-提交审核意见-风控领导")
	public void submitPickupOperationAuditOpinion(PickupAuditInfo params);
	
	@Permission
	@Action(version = FinVersion1.class, description = "提货申请审核-增补审核意见-副总经理")
	public void supplementPickupAudit1Opinion(PickupAuditInfo params);
	
	@Permission
	@Action(version = FinVersion1.class, description = "提货申请审核-提交审核意见-副总经理")
	public void submitPickupAudit1Opinion(PickupAuditInfo params);
	
	@Permission
	@Action(version = FinVersion1.class, description = "提货申请审核-增补审核意见-总经理")
	public void supplementPickupFinalAuditOpinion(PickupAuditInfo params);
	
	@Permission
	@Action(version = FinVersion1.class, description = "提货申请审核-提交审核意见-总经理")
	public void submitPickupFinalAuditOpinion(PickupAuditInfo params);
	
	@Permission
	@Action(version = FinVersion1.class, description = "提货申请审核-增补审核意见-董事长")
	public void supplementPickupAudit2Opinion(PickupAuditInfo params);
	
	@Permission
	@Action(version = FinVersion1.class, description = "提货申请审核-提交审核意见-董事长")
	public void submitPickupAudit2Opinion(PickupAuditInfo params);
	
	@Permission
	@Action(version = FinVersion1.class, description = "换箱理货信息同步")
	public void syncNormalPickupExchangeContainer(
			@Parameter(name = "containerId", description = "换箱信息ID") Long containerId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "批量换箱理货信息同步")
	public void syncNormalPickupExchangeContainerAll(
			@Parameter(name = "pickupId", description = "换箱信息ID") Long pickupId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "换箱理货信息协议上传")
	public void protocolNormalPickupApplication(
			@Parameter(name = "pickupId", description = "提货申请ID") Long pickupId,
			@Parameter(name = "protocolUuids", description = "换箱提货协议资料") String protocolUuids
	);
	
	@Action(version = FinVersion1.class, description = "加锁未加锁的箱")
	public void initInventory();

	@Permission
	@Action(version = FinVersion1.class, description = "拒绝提货申请")
	public void opposeNormalPickupApplication(
			@Parameter(name = "pickupId", description = "提货申请ID") Long pickupId,
			@Parameter(name = "disagreeReson", description = "审核拒绝原因 系统参数ID=9", nullable = true) Integer disagreeReson,
			@Parameter(name = "auditRemark", description = "审核备注", nullable = true) String auditRemark
	);

	@Permission
	@Action(version = FinVersion1.class, description = "标记提货申请违约")
	public void breakNormalPickupContract(
			@Parameter(name = "pickupId", description = "提货申请ID") Long pickupId,
			@Parameter(name = "breachContract", description = "违约备注", nullable = true) String breachContract
	);

	@Permission
	@Action(version = FinVersion1.class, description = "获取提货申请明细(提货申请)")
	public PickupApplicationDetail inquireNormalPickupApplicationDetail(
			@Parameter(name = "pickupId", description = "提货申请ID") Long pickupId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "修改运单号、货箱")
	public void updatePickupApplicationDetails(
			@Parameter(name = "containerId", description = "提货申请ID",nullable = true) Long containerId,
			@Parameter(name = "waybillNumber", description = "运单号") String waybillNumber,
			@Parameter(name = "caseNumber", description = "货箱") String caseNumber
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "查询换箱信息")
	public ExchangeContainerInventory inquireExchangeContainerInventoryDetail(
			@Parameter(name = "containerId", description = "提货申请ID") Long containerId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "查询提货申请列表")
	public PageList<PickupApplicationLineInfo> inquireNormalPickupApplicationPageList(
			@Parameter(name = "pickupId", description = "提货申请ID", nullable = true) Long[] pickupIds,
			@Parameter(name = "enterpriseId", description = "﻿融资企业ID", nullable = true) Long enterpriseId,
			@Parameter(name = "financeId", description = "﻿融资信息ID", nullable = true) Long financeId,
			@Parameter(name = "financeNumber", description = "﻿融资编号", nullable = true) String financeNumber,
			@Parameter(name = "dateBegin", description = "﻿申请开始时间", nullable = true) String dateBegin,
			@Parameter(name = "dateEnd", description = "﻿申请结束时间", nullable = true) String dateEnd,
			@Parameter(name = "applicationState", description = "申请状态 1:未审批/2:同意/3:拒绝/4:已收款/5:已放货/6:违约", nullable = true) Integer applicationState,
			@Parameter(name = "waybillNumber", description = "运单号", nullable = true) String waybillNumber,
			@Parameter(name = "caseNumber", description = "箱号", nullable = true) String caseNumber,
			@Parameter(name = "enterpriseName", description = "融资客户", nullable = true) String enterpriseName,
			@Parameter(name = "productType", description = "产品类型", nullable = true) Integer productType,
			@Parameter(name = "bulkstockName", description = "融资货物", nullable = true) String bulkstockName,
			@Parameter(name = "pickupMethod", description = "提货方式", nullable = true) Integer pickupMethod,
			@Parameter(name = "pickupNumber", description = "提货申请编号", nullable = true) String pickupNumber,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "查询提货申请列表")
	public List<PickupApplicationDetail> inquireNormalPickupApplicationList(
			@Parameter(name = "enterpriseName", description = "﻿融资企业", nullable = true) String enterpriseName,
			@Parameter(name = "dateBegin", description = "﻿申请开始时间", nullable = true) String dateBegin,
			@Parameter(name = "dateEnd", description = "﻿申请结束时间", nullable = true) String dateEnd,
			@Parameter(name = "waybillNumber", description = "运单号", nullable = true) String waybillNumber,
			@Parameter(name = "caseNumber", description = "箱号", nullable = true) String caseNumber
	);

	//==================================================================================================================================================================//
	@Permission
	@Action(version = FinVersion1.class, description = "提前还款申请")
	@Parameter(name = "pickupId", description = "提前还款ID")
	public String createPrePickupApplication(AppointPickupParams prePickupParams);

	@Permission
	@Action(version = FinVersion1.class, description = "取消提前还款申请")
	public void cancelPrePickupApplication(
			@Parameter(name = "pickupId", description = "提前还款ID") Long pickupId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "同意提前还款申请")
	public void consentPrePickupApplication(
			@Parameter(name = "pickupId", description = "提前还款ID") Long pickupId,
			@Parameter(name = "financeValuation", description = "货物金额")  BigDecimal financeValuation,
			@Parameter(name = "bulkstockInterest", description = "货物利息") BigDecimal bulkstockInterest,
			@Parameter(name = "adjustAmount", description = "调整金额") BigDecimal adjustAmount,
			@Parameter(name = "adjustReson", description = "审核调整原因", nullable = true) Integer adjustReson,
			@Parameter(name = "adjustment", description = "审核调整说明", nullable = true) String adjustment,
			@Parameter(name = "auditRemark", description = "审核备注", nullable = true) String auditRemark
	);

	@Permission
	@Action(version = FinVersion1.class, description = "拒绝提前还款申请")
	public void opposePrePickupApplication(
			@Parameter(name = "pickupId", description = "提前还款ID") Long pickupId,
			@Parameter(name = "disagreeReson", description = "审核拒绝原因 系统参数ID=9") Integer disagreeReson,
			@Parameter(name = "auditRemark", description = "审核备注", nullable = true) String auditRemark
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "获取提前还款申请明细")
	public PickupApplicationDetail inquirePrePickupApplicationDetail(
			@Parameter(name = "pickupId", description = "提前还款ID") Long pickupId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "查询提前还款申请列表")
	public PageList<PickupApplicationLineInfo> inquirePrePickupApplicationPageList(
			@Parameter(name = "pickupId", description = "﻿提前还款ID", nullable = true) Long[] pickupIds,
			@Parameter(name = "enterpriseId", description = "﻿融资企业ID", nullable = true) Long enterpriseId,
			@Parameter(name = "financeId", description = "﻿融资信息ID", nullable = true) Long financeId,
			@Parameter(name = "financeNumber", description = "﻿融资编号", nullable = true) String financeNumber,
			@Parameter(name = "dateBegin", description = "﻿申请开始时间", nullable = true) String dateBegin,
			@Parameter(name = "dateEnd", description = "﻿申请结束时间", nullable = true) String dateEnd,
			@Parameter(name = "applicationState", description = "申请状态 1:未审批/2:同意/3:拒绝/4:已收款/5:已放货/6:违约", nullable = true) Integer applicationState,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);

	//=================================================================================================//
	@Permission
	@Action(version = FinVersion1.class, description = "赎货申请")
	@Parameter(name = "pickupId", description = "赎货申请ID")
	public String createRansomPickupApplication(AppointPickupParams ransomPickupParams);
	
	@Permission
	@Action(version = FinVersion1.class, description = "取消赎货申请")
	public void cancelRansomPickupApplication(
			@Parameter(name = "pickupId", description = "赎货申请ID") Long pickupId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "同意赎货申请")
	public void consentRansomPickupApplication(
			@Parameter(name = "pickupId", description = "赎货申请ID") Long pickupId,
			@Parameter(name = "financeValuation", description = "货物金额")  BigDecimal financeValuation,
			@Parameter(name = "bulkstockInterest", description = "货物利息") BigDecimal bulkstockInterest,
			@Parameter(name = "adjustAmount", description = "调整金额") BigDecimal adjustAmount,
			@Parameter(name = "adjustReson", description = "审核调整原因", nullable = true) Integer adjustReson,
			@Parameter(name = "adjustment", description = "审核调整说明", nullable = true) String adjustment,
			@Parameter(name = "auditRemark", description = "审核备注", nullable = true) String auditRemark
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "拒绝赎货申请")
	public void opposeRansomPickupApplication(
			@Parameter(name = "pickupId", description = "赎货申请ID") Long pickupId,
			@Parameter(name = "disagreeReson", description = "审核拒绝原因 系统参数ID=9") Integer disagreeReson,
			@Parameter(name = "auditRemark", description = "审核备注", nullable = true) String auditRemark
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "获取赎货申请明细")
	public PickupApplicationDetail inquireRansomPickupApplicationDetail(
			@Parameter(name = "pickupId", description = "赎货申请ID") Long pickupId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "查询赎货申请列表")
	public PageList<PickupApplicationLineInfo> inquireRansomPickupApplicationPageList(
			@Parameter(name = "pickupId", description = "﻿赎货信息ID", nullable = true) Long[] pickupIds,
			@Parameter(name = "enterpriseId", description = "﻿融资企业ID", nullable = true) Long enterpriseId,
			@Parameter(name = "financeId", description = "﻿融资信息ID", nullable = true) Long financeId,
			@Parameter(name = "financeNumber", description = "﻿融资编号", nullable = true) String financeNumber,
			@Parameter(name = "dateBegin", description = "﻿申请开始时间", nullable = true) String dateBegin,
			@Parameter(name = "dateEnd", description = "﻿申请结束时间", nullable = true) String dateEnd,
			@Parameter(name = "applicationState", description = "申请状态 1:未审批/2:同意/3:拒绝/4:已收款/5:已放货/6:违约", nullable = true) Integer applicationState,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);

	// =======================================================================================================================================================//
	@Permission
	@Action(version = FinVersion1.class, description = "延期提货申请")
	@Parameter(name = "pickupDelayId", description = "提货延期申请ID")
	public String createPickupDelayApplication(
			@Parameter(name = "pickupId", description = "提货申请ID") Long pickupId,
			@Parameter(name = "deliveryDate", description = "延期配送日期") String deliveryDate,
			@Parameter(name = "estimateDelayAmount", description = "预计延期金额", nullable = true) BigDecimal estimateDelayAmount,
			@Parameter(name = "delayReson", description = "延期原因") Integer delayReson,
			@Parameter(name = "delayRemark", description = "延期说明") String delayRemark
	);

	@Permission
	@Action(version = FinVersion1.class, description = "延期提货申请")
	public void updatePickupDelayApplication(
			@Parameter(name = "pickupDelayId", description = "提货延期申请ID") Long pickupDelayId,
			@Parameter(name = "deliveryDate", description = "延期配送日期") String deliveryDate,
			@Parameter(name = "estimateDelayAmount", description = "预计延期金额", nullable = true) BigDecimal estimateDelayAmount
	);

	@Permission
	@Action(version = FinVersion1.class, description = "取消延期提货申请")
	public void cancelPickupDelayApplication(
			@Parameter(name = "pickupDelayId", description = "提货延期申请ID") Long pickupDelayId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "同意提货延期申请")
	public void consentPickupDelayApplication(
			@Parameter(name = "pickupDelayId", description = "提货延期申请ID") Long pickupDelayId,
			@Parameter(name = "auditAmount", description = "审核延期金额") BigDecimal auditAmount,
			@Parameter(name = "auditRemark", description = "审核备注", nullable = true) String auditRemark
	);

	@Permission
	@Action(version = FinVersion1.class, description = "拒绝提货延期申请")
	public void opposePickupDelayApplication(
			@Parameter(name = "pickupDelayId", description = "提货延期申请ID") Long pickupDelayId,
			@Parameter(name = "disagreeReson", description = "审核拒绝原因 系统参数ID=9") Integer disagreeReson,
			@Parameter(name = "auditRemark", description = "审核备注", nullable = true) String auditRemark
	);

	@Permission
	@Action(version = FinVersion1.class, description = "获取提货延期申请明细")
	public PickupDelayApplicationDetail inquirePickupDelayApplicationDetail(
			@Parameter(name = "pickupDelayId", description = "提货延期申请ID") Long pickupDelayId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "查询提货延期申请列表")
	public PageList<PickupDelayApplicationLineInfo> inquirePickupDelayApplicationPageList(
			@Parameter(name = "pickupDelayId", description = "提货延期申请ID", nullable = true) Long[] pickupDelayIds,
			@Parameter(name = "enterpriseId", description = "﻿融资企业ID", nullable = true) Long enterpriseId,
			@Parameter(name = "financeId", description = "﻿融资信息ID", nullable = true) Long financeId,
			@Parameter(name = "financeNumber", description = "﻿融资编号", nullable = true) String financeNumber,
			@Parameter(name = "dateBegin", description = "﻿申请开始时间", nullable = true) String dateBegin,
			@Parameter(name = "dateEnd", description = "﻿申请结束时间", nullable = true) String dateEnd,
			@Parameter(name = "applicationState", description = "申请状态 /1:未审批/2:同意/3:拒绝/4:取消", nullable = true) Integer applicationState,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);

}
